﻿<UserControl x:Class="Dotway.WPF.Samples.DotwaySampleApplication.ColorPickerSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:Dotway.WPF.Controls;assembly=Dotway.WPF.Controls">
    <Grid Margin="20">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <controls:ColorPicker x:Name="colorPicker" Grid.Row="0" Width="450" Height="300" Background="DimGray" Foreground="White" InitialColor="#FF730800"/>
        
        <StackPanel Grid.Row="1">
            <TextBlock Text="Selected color:" HorizontalAlignment="Center" />
            <Rectangle Width="100" Height="100" RadiusX="10" RadiusY="10" Stroke="Black" StrokeThickness="1">
                <Rectangle.Fill>
                    <SolidColorBrush Color="{Binding ElementName=colorPicker, Path=SelectedColor.Color}" />
                </Rectangle.Fill>
            </Rectangle> 
        </StackPanel>
    </Grid>
</UserControl>
